<template>
      <div class="Simple">
          <div class="Precious">
            <ul>
              <li v-for="(item,index) in Precious" :key="index">
                <div style="text-align: left;width: 100%;padding-left:1rem;color:rgb(0,0,0);padding-top: .4rem">
                  <h4>{{item.title}}</h4>
                  <span style="color: #666771; font-size:0.75rem">{{item.name}}</span>
                </div>
                <div class="PreciousImg">
                  <img :src="item.img" alt="">
                  <img :src="item.img1" alt="">
                </div>
              </li>
            </ul>
          </div>
          <div class="PreciousList">
            <ul>
              <li v-for="(item,index) in PreciousList" :key="index">
                <div style="text-align: left;width: 100%;color:rgb(0,0,0);padding-top: .4rem;padding-left: 0.625rem">
                  <h4>{{item.title}}</h4>
                  <span  style="color: #666771; font-size: 0.75rem">{{item.name}}</span>
                </div>
                <div style="padding-top: 0.3125rem">
                  <img :src="item.img" alt="">
                </div>
              </li>
            </ul>
          </div>
      </div>
</template>

<script>
export default {
  name: "Simple",
  data: () => ({
    Precious: [],
    PreciousList:[]
  }),
  mounted() {
         let that = this;
         let url = 'http://localhost:5000';
         this.$http.get(url+'/data/Simple.json')
        .then(function (response) {

          that.Precious=response.data.Precious.map(i=>({
            img: url + i['img'],
            img1:url+i['img1'],
            name:i['name'],
            title:i['title']
          }));
          that.PreciousList=response.data.PreciousList.map(i=>({
            img: url + i['img'],
            name:i['name'],
            title:i['title']
          }))

        })
        .catch(function (error) {
          console.log(error);
        })
        .then(function () {
          // always executed
        });
  }
}
</script>

<style scoped>
.Simple{
  width: 22.1875rem;
  height: 15rem;
  background-color: #FFFFFF;
  margin: 0.625rem auto;
  border-radius: 0.625rem;
}
.Precious{
  width: 100%;
  height: 7.5rem;
}
.Precious ul{
  display: flex;
}
.Precious ul li{
  width: 50%;
}
.PreciousImg{
  width: 100%;
  padding: 0.625rem 0;
  display: flex;
  justify-content: space-around;
}
.PreciousImg img,.PreciousList img{
  width: 3.75rem;
  height: 3.75rem;
}
.PreciousList{
  width: 100%;
  height: 7.5rem;
  padding-top:0.3125rem;
}
.PreciousList ul{
  width: 100%;
  display: flex;
}
.PreciousList ul li{
  width: 25%;
}
</style>